

clear 
set scheme lean2, permanent
global pm = char(177)
set more off

gl date = c(current_date)
if c(os) == "MacOSX" gl user "/Users/`c(username)'"
else if c(os) == "Windows" gl user "C:\Users\\`c(username)'"
else if c(os) == "Unix" gl user "/usr/`c(username)'"
di "$user
 
set graphics on  
 
global path_data_processed "\data\processed"
global path_output "\data\output"
 
clear all
set more off

cd "$path_data_processed"
use "experimentRNall.dta", clear

cd "$path_output"
 
 
 histogram  unemp_prob, xtitle("Percent chance of an increase in national unemployment")  width(2) frac
		graph export "unempl_increase.eps", replace
		graph export "unempl_increase.pdf", replace
		graph save "unempl_increase.gph", replace


 histogram  unemp_county_prob, xtitle("Percent chance of an increase in county unemployment")  width(2) frac
		graph export "unempl_increase_county.eps", replace
		graph export "unempl_increase_county.pdf", replace
		graph save "unempl_increase_county.gph", replace



graph combine "unempl_increase.gph" "unempl_increase_county.gph", ycommon xcommon col(2) ///	  
		name(unemploymentexpectations, replace)	
	   graph display unemploymentexpectations, xsize(20) ysize(10)
graph export "unemploymentexpectations.pdf", replace
		
		

 histogram  infl_mean, xtitle("Heterogeneity in mean inflation expectations")  width(1) frac
		graph export "infl_mean.eps", replace
		graph export "infl_mean.pdf", replace
		graph save "infl_mean.gph", replace
		

 histogram  infl_sd, xtitle("Heterogeneity in inflation uncertainty")  width(1) frac
		graph export "infl_sd.eps", replace
		graph export "infl_sd.pdf", replace
		graph save "infl_sd.gph", replace
				


graph combine "infl_mean.gph" "infl_sd.gph", ycommon col(2) ///	  
		name(inflation_expectations, replace)	
	   graph display inflation_expectations, xsize(20) ysize(10)
graph export "inflation_expectations.pdf", replace
		
		
		


 histogram  earn_mean, xtitle("Heterogeneity in mean earnings expectations")  width(1) frac
		graph export "earn_mean.eps", replace
		graph export "earn_mean.pdf", replace
		graph save "earn_mean.gph", replace
		

 histogram  earn_sd, xtitle("Heterogeneity in earnings uncertainty")  width(1) frac
		graph export "earn_sd.eps", replace
		graph export "earn_sd.pdf", replace
		graph save "earn_sd.gph", replace
				


graph combine "earn_mean.gph" "earn_sd.gph", ycommon  col(2) ///	  
		name(earn_expectations, replace)	
	   graph display earn_expectations, xsize(20) ysize(10)
graph export "earn_expectations.pdf", replace




 histogram  jobfind, xtitle("Percent chance of fnding a job within 3 months")  width(2) frac
		graph export "jobfind.eps", replace
		graph export "jobfind.pdf", replace
		graph save "jobfind.gph", replace
		

 histogram  jobloss, xtitle("Percent chance of losing job")  width(2) frac
		graph export "jobloss.eps", replace
		graph export "jobloss.pdf", replace
		graph save "jobloss.gph", replace
				


graph combine  "jobloss.gph" "jobfind.gph", ycommon xcommon col(2) ///	  
		name(jobexp, replace)	
	   graph display jobexp, xsize(20) ysize(10)
graph export "jobexp.pdf", replace
		
				


 
	
	   


 	   
	   
	   

